﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Pakxel.SmartLogistic.Modulos
{
    public partial class Origen : Pakxel.SmartLogistic.Modulos.CatParent
    {
        public Origen()
        {
            InitializeComponent();
        }

        private void Origen_Load(object sender, EventArgs e)
        {

        }

        private void rTxTipo_TextChanged(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(rTxTipo.Text))
            {
                rRBAmbos.IsChecked = false;
                rRBDestino.IsChecked = false;
                rRBOrigen.IsChecked = false;
            }
            else
                switch (rTxTipo.Text)
                {
                    case "O": rRBOrigen.IsChecked = true; break;
                    case "D": rRBDestino.IsChecked = true; break;
                    default: rRBAmbos.IsChecked = true; break;
                }

        }

        private void rRBTipo_ToggleStateChanged(object sender, Telerik.WinControls.UI.StateChangedEventArgs args)
        {
            string _val = "A";
            if (rRBOrigen.IsChecked) _val = "O";
            else if (rRBDestino.IsChecked) _val = "D";

            rTxTipo.Text = _val;
        }
    }
}
